-- GENERATED SPELL FOR [Droggam] --


function spell0_20731(pUnit, Event) --@Bloodmaul Intoxication,n/a--
pUnit:FullCastSpellOnTarget(35240,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20731', 25000, 1)
end

function spell1_20731(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20731', 3000, 1)
end

function spell2_20731(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_20731', 0, 1)
end

function spell3_20731(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_20731', 8326, 1)
end

function Sorts_20731(pUnit, Event)
local choix_sorts_20731 = math.random(0, 3)
if choix_sorts_20731 == 0 then
pUnit:RegisterEvent('spell0_20731', 1, 1)
end
if choix_sorts_20731 == 1 then
pUnit:RegisterEvent('spell1_20731', 1, 1)
end
if choix_sorts_20731 == 2 then
pUnit:RegisterEvent('spell2_20731', 1, 1)
end
if choix_sorts_20731 == 3 then
pUnit:RegisterEvent('spell3_20731', 1, 1)
end
end

function mob20731_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20731', math.random(1500, 3000), 1)
end

function mob20731_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20731_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20731_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20731, 1, 'mob20731_Action')
RegisterUnitEvent(20731, 2, 'mob20731_Leave')
RegisterUnitEvent(20731, 3, 'mob20731_Kill')
RegisterUnitEvent(20731, 4, 'mob20731_Die')
